set(ENCRPY_NAME encrypt)


include_directories(${CMAKE_SOURCE_DIR}/include)

file(GLOB_RECURSE testHeaderFiles "${CMAKE_SOURCE_DIR}/include/*.hpp" "${CMAKE_SOURCE_DIR}/include/*.h")
set(INCLUDE_FILES_LIST
    ${testHeaderFiles}
)

set(OUTER_INCLUDE_FILES_LIST
    ${CMAKE_SOURCE_DIR}/include/keys.h
    )

set(ENCRPT_SOURCE_FILES_LIST
    encrypt.c
    keys.c
)

ADD_LIBRARY(${ENCRPY_NAME} SHARED ${INCLUDE_FILES_LIST} ${ENCRPT_SOURCE_FILES_LIST})

target_link_directories(${ENCRPY_NAME}
PUBLIC 
${HTSC2DATA_LIBRARY_DIR}
${OPENSSL_LIBRARY_DIR}
)

target_include_directories(${ENCRPY_NAME}
PUBLIC 
${HTSC2DATA_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
)

target_link_libraries(${ENCRPY_NAME} 
                        ${HT98SC2_SHARE_LIB} 
                        ${HTSC2_STATIC_LIB}
                        ${OPENSSL_LIBS}
                        rt pthread stdc++fs)

INSTALL(TARGETS ${ENCRPY_NAME}  
        LIBRARY DESTINATION lib
)

install (FILES ${OUTER_INCLUDE_FILES_LIST}
        DESTINATION include)
